//需求申请
//数据变更表
import cache from '/@/utils/hook/cache';
import commonRequest from '/@/api/common/common';
export default function (data: any) {
	const array = [
		{
			type: 'slot',
			slotName: 'tint1',
			label: window.$t('t2o7swLeobGCsdtY0Qy7M'),
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
		},
		{
			type: 'input',
			label: window.$t('5SdqephRho555HxqbTCbi'),
			key: 'applicantName',
			value: cache.getCache('userInfo').staffName,
			disabledStyle: true,
		},
		{
			//日期不用传,使用创建日期
			type: 'input',
			label: window.$t('8gijWjiIjgQJkhF_1KLq'),
			key: 'code',
			value: data.date,
			disabledStyle: true,
		},
		{
			type: 'input',
			label: window.$t('mcSzgDrxfhNi0yEi_2ohZ'),
			key: 'appDivision',
			value: cache.getCache('userInfo').orgName,
			disabledStyle: true,
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
		},

		{
			type: 'select',
			label: window.$t('yJauBhY_6TVh0SIhqXngi'),
			key: 'mduleName',
			value: data.mduleName || '',
			placeHolder: window.$t('1IdJIz8ljGphZHtaxcfJh'),
			selectOption: {
				type: 'remote',
				loading: false,
				//模糊搜索时不要忘记getModuleNameList函数传参!!
				requestMethod: commonRequest.getModuleNameList,
				searchKey: 'value',
				value: 'value',
				label: 'value',
				otherParams: {
					TypeId: 363544334344322,
				},
			},
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
			rules: [{ required: true, message: window.$t('yiqR4gvApEkLIfOh2x3lR'), trigger: ['blur', 'change'] }],
		},

		{
			type: 'radio',
			label: window.$t('hn3inoP_0cerIa9fGpjA'),
			key: 'demandClass',
			value: data.demandClass || '',
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
			options: [
				{
					label: window.$t('neGi0ecsMa66rC4eBwVYt'),
					value: window.$t('neGi0ecsMa66rC4eBwVYt'),
				},
				{
					label: window.$t('pcSiqnPfUJl0s5kyH0bAb'),
					value: window.$t('pcSiqnPfUJl0s5kyH0bAb'),
				},
				{
					label: window.$t('rVMj58L9o3lj2PmGz8B9B'),
					value: window.$t('rVMj58L9o3lj2PmGz8B9B'),
				},
				{
					label: window.$t('obv0757Ht2w02giOu4fQp'),
					value: window.$t('obv0757Ht2w02giOu4fQp'),
				},
			],
			rules: [{ required: true, message: window.$t('gjicXxLtySfwThPcYuQyr'), trigger: ['change', 'blur'] }],
		},
		{
			type: 'textarea',
			label: window.$t('5Bmgdc0UmccQt7EnZftG'),
			key: 'needContent',
			value: data.needContent || '',
			placeHolder: window.$t('nilUZuw7IoOjUaGpUn0X'),

			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
			rules: [{ required: true, message: window.$t('gvdS4BnsfVIi7AepzY2Td'), trigger: ['change', 'blur'] }],
		},
		{
			type: 'textarea',
			label: window.$t('kohp6OsgcqbO5MiauPvX'),
			key: 'poblem',
			value: data.poblem || '',
			placeHolder: window.$t('5Xv28vzlZYzJ_1B3xhRuG'),
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
			rules: [{ required: true, message: window.$t('gjicXxLtySfwThPcYuQyr'), trigger: ['change', 'blur'] }],
		},
		{
			type: 'select',
			label: window.$t('iNJwO2yfbWhu6WwzyfFa'),
			key: 'auditProgress',
			value: '',
			placeHolder: window.$t('1IdJIz8ljGphZHtaxcfJh'),
			selectOption: {
				type: 'remote',
				loading: false,
				requestMethod: commonRequest.getCheckList,
				searchKey: 'checkflowName',
				value: 'id',
				label: 'checkFuncname',
				otherParams: {
					checkFuncname: window.$t('js3zGoSsye5O6Mrscde6'),
				},
				// fill: {
				// 	OperationID: 'id',
				// },
			},
			rules: [{ required: true, message: window.$t('nAtA0A2MpXGmhpalLJwD'), trigger: ['blur', 'change'] }],
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
		},
		{
			type: 'input',
			label: window.$t('usCpe569KRrXl4SndjyX'),
			key: 'description',
			value: data.description || '',
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
		},

		{
			type: 'upload',
			label: window.$t('myRuHu6atYv4ATqwwdiq'),
			key: 'pictuctPath',
			value: [],
			uploadOption: {
				multiple: false,
				limit: 1,
			},
		},
	];
	return array;
}
